import java.io.IOException;
import javax.swing.JFrame;

public class mifc_test {

	public static void main(String[] args) {
		/*
		ConnectionStatus internetStatus = null;
		InternetConnectivity conn = new InternetConnectivity();

	
		internetStatus = conn.runTests(10);
		
		if (internetStatus.currentLightStatus == ConnectionStatus.lights.RED){
			System.out.println("RED");
		} else if (internetStatus.currentLightStatus == ConnectionStatus.lights.YELLOW){
			System.out.println("YELLOW");
		} else if (internetStatus.currentLightStatus == ConnectionStatus.lights.GREEN){
			System.out.println("GREEN");
		}
		
		// test HTTP Connectivity
		internetStatus = null;
		HTTPConnectivity httpConnectivity = new HTTPConnectivity();
		httpConnectivity.setURL("https://mail.google.com");
		
		
		try {
			internetStatus = httpConnectivity.runTests(1);
		} catch (IOException e) {
			System.out.println("Error in Checking HTTP Connectivity");
			e.printStackTrace();
		}
		
		if (internetStatus.currentLightStatus == ConnectionStatus.lights.GREEN) 
			System.out.println("HTTP Connectivity Works fine");
		else
			System.out.println("HTTP Connectivity has problems");
		
		// test SMTP port (25 or 465 or 587)
		internetStatus = null;
		AllSMTPConnectivity smtpconn = new AllSMTPConnectivity();
		try {
			smtpconn.setProperties(587);
			internetStatus = smtpconn.runTests(1);
		} catch (Exception e) {
			System.out.println("This is (some) SMTP Connectivity Error");
			e.printStackTrace();
		}
		if (internetStatus.currentLightStatus == ConnectionStatus.lights.GREEN)
			System.out.println("GREEN in SMTP");
		else 
			System.out.println("Skata in SMTP");
		
		// test POP3 port (110 or 995)
		internetStatus = null;
		AllPOP3Connectivity pop3conn = new AllPOP3Connectivity();
		try {
			pop3conn.setProperties(995);
			internetStatus = pop3conn.runTests(1);
		} catch (Exception e) {
			System.out.println("This is (some) POP3 Connectivity Error");
			e.printStackTrace();		
		}
		if (internetStatus.currentLightStatus == ConnectionStatus.lights.GREEN)
			System.out.println("GREEN in POP3");
		else
			System.out.println("Skata in POP3");
		
		// test IMAP port (143 or 993)
		internetStatus = null;
		AllIMAPConnectivity imapconn = new AllIMAPConnectivity();
		try {
			imapconn.setProperties(143);
			internetStatus = imapconn.runTests(1);
		} catch (Exception e) {
			System.out.println("This is (some) IMAP Connectivity Error");
			e.printStackTrace();		
		}
		if (internetStatus.currentLightStatus == ConnectionStatus.lights.GREEN)
			System.out.println("GREEN in IMAP");
		else {
			System.out.println("Skata in IMAP");
		}
		
		
		String host = "www.google.com";
		try {
			System.out.println("Average Latency: " + PingTester.latencyTest(host) + " ms");
		} catch (IOException e) {
			System.out.println("IOException in Ping");
		} catch (InterruptedException e) {
			System.out.println("InterruptedException in Ping");
		}
		
		host = "www.auth.gr";
		try {
			System.out.println("IPv6 Capable: " + IPv6Tester.ipv6Test(host));
		} catch (IOException e) {
			System.out.println("IOException in Traceroute");
		} catch (InterruptedException e) {
			System.out.println("InterruptedException in Traceroute");
		}
		*/
		
		GUI gui = new GUI();
		gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//		gui.setResizable(false);
		gui.setSize(500,600);
		gui.setVisible(true);
		
		
		System.out.println("End of Main");
		
	} // end main	
} // end class mifc_test 
